import Antd from 'ant-design-vue';
import 'ant-design-vue/dist/reset.css';
import { createApp } from 'vue';
import App from './App.vue';
import router from './router';
import ElementPlus from 'element-plus';
import '@/assets/iconfont/iconfont.js';
import 'element-plus/dist/index.css'
import { createPinia } from 'pinia'



// main.ts
//引入全局样式
// import './styles/main.scss';
const pinia = createPinia()

const init = () => {
  createApp(App).use(Antd).use(router).use(ElementPlus).use(pinia).mount("#app");
};

if (process.env.NODE_ENV === 'development') {
  // 本地开发需要等待全局变量初始化
  setTimeout(() => {
    init();
  }, 2000);
} else {
  console.log('初始化app');
  init();
}
